package com.cloud.drore.eboss.supplier.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.cloud.drore.eboos.common.base.BaseEntity;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.NotBlank;

import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 浙江卓锐科技股份有限公司 版权所有  Copyright 2018<br>
 *
 * @Description: <br>
 * @Project: eboos <br>
 * @CreateDate: Created in 2018/1/22 0022 上午 10:51 <br>
 * @Author: <a href="410508961@qq.com">夏凯</a>
 */
@Data
@Table(name = "eboss_finace_form")
public class SupplierSettlementTable extends BaseEntity<Long> {
    /**
     * 产品编号
     */
    @JsonProperty("product_number")
    @JSONField(name = "product_number")
    @ApiModelProperty(name = "product_number", notes = "产品数量", example = "LL500")
    private Long productNumber;

    /**
     * 产品名称
     */
    @NotBlank(message = "产品名称不能为空！")
    @JsonProperty("product_name")
    @JSONField(name = "product_name")
    @ApiModelProperty(name = "product_name", notes = "产品名称", example = "西溪湿地门票")
    private String productName;

    /**
     * 产品人群
     */
    @NotBlank(message = "产品人群不能为空！")
    @JsonProperty("product_crowd")
    @JSONField(name = "product_crowd")
    @ApiModelProperty(name = "product_crowd", notes = "产品人群", example = "老年人")
    private String productCrowd;

    /**
     * 分销商id
     */
    @JsonProperty("distributor_id")
    @JSONField(name = "distributor_id")
    @ApiModelProperty(name = "distributor_id", notes = "分销商id", example = "15")
    private Long distributorId;

    /**
     * 分销商名称
     */
    @NotBlank(message = "分销商名称不能为空！")
    @JsonProperty("distributor_name")
    @JSONField(name = "distributor_name")
    @ApiModelProperty(name = "distributor_name", notes = "分销商名称", example = "携程")
    private String distributorName;

    /**
     * 交易数量
     */
    @JsonProperty("product_volume")
    @JSONField(name = "product_volume")
    @ApiModelProperty(name = "product_volume", notes = "交易数量", example = "500")
    private Long productVolume;

    /**
     * 结算商户的id
     */
    @JsonProperty("merchant_id")
    @JSONField(name = "merchant_id")
    @ApiModelProperty(name = "merchant_id", notes = "结算商户的id", example = "15")
    private Long merchantId;

    /**
     * 产品id
     */
    @JsonProperty("product_id")
    @JSONField(name = "product_id")
    @ApiModelProperty(name = "product_id", notes = "产品id", example = "15")
    private Long productId;

    /**
     * 产品单价
     */
    @JsonProperty("unit_price")
    @JSONField(name = "unit_price")
    @ApiModelProperty(name = "unit_price", notes = "产品单价", example = "50.00")
    private BigDecimal unitPrice;



    /**
     * 应付总额
     */
    @JsonProperty("total_amount_should")
    @JSONField(name = "total_amount_should")
    @ApiModelProperty(name = "total_amount_should", notes = "应付总额", example = "5000.00")
    private BigDecimal totalAmountShould;

    /**
     * 应结算
     */
    @JsonProperty("total_amount_settlement")
    @JSONField(name = "total_amount_settlement")
    @ApiModelProperty(name = "total_amount_settlement", notes = "应结算", example = "5000.00")
    private BigDecimal totalAmountSettlement;

    /**
     * 费率
     */
    @NotBlank(message = "费率不能为空！")
    @JsonProperty("rate")
    @JSONField(name = "rate")
    @ApiModelProperty(name = "rate", notes = "费率", example = "2.5%")
    private String rate;


    /**
     * 开始时间
     */
    @JsonProperty("settlement_begin_time")
    @JSONField(name = "settlement_begin_time", format = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(name = "settlement_begin_time", notes = "开始时间", example = "2018-01-03 18:30:10")
    private Date settlementBeginTime;


    /**
     * 结束时间
     */
    @JsonProperty("settlement_end_time")
    @JSONField(name = "settlement_end_time", format = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(name = "settlement_end_time", notes = "结束时间", example = "2018-01-03 18:30:10")
    private Date settlementEndTime;


}
